<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%smscode}}".
 *
 * @property int $codeId 验证码编号
 * @property string $codeKey 验证码标识
 * @property string $code 验证码
 * @property string $mobile 目标手机
 * @property int $status 发送状态（0：未发送，1：发送成功，2：发送失败）
 * @property int $stime 发送时间
 * @property string $serviceType 业务类型
 */
class Smscode extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%smscode}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['status', 'stime'], 'integer'],
            [['codeKey'], 'string', 'max' => 200],
            [['code', 'mobile', 'serviceType'], 'string', 'max' => 20],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'codeId' => Yii::t('app', 'Code ID'),
            'codeKey' => Yii::t('app', 'Code Key'),
            'code' => Yii::t('app', 'Code'),
            'mobile' => Yii::t('app', 'Mobile'),
            'status' => Yii::t('app', 'Status'),
            'stime' => Yii::t('app', 'Stime'),
            'serviceType' => Yii::t('app', 'Service Type'),
        ];
    }
}
